﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccess.ObjectTwo
{
    public class D_Delete
    {
        ConnectionToDataBase ex = new ConnectionToDataBase();
        DataTable tb = new DataTable();
        public bool DeleteAccount(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteAccount", sqlParameters);
        }
        public bool DeleteNew(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteNew", sqlParameters);
        }
        public bool DeleteBran(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteBran", sqlParameters);
        }
        public bool DeleteOrder(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteOrder", sqlParameters);
        }
        public bool DeleteFeed(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteFeed", sqlParameters);
        }
        public bool DeleteCity(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteCity", sqlParameters);
        }
        public bool DeleteCom(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteCom", sqlParameters);
        }
        public bool DeleteDis(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteDis", sqlParameters);
        }
        public bool DeleteDisFee(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteDisFee", sqlParameters);
        }
        public bool DeleteService(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteService", sqlParameters);
        }
        public bool DeleteORDERA(int val)
        {
            SqlParameter[] sqlParameters = new SqlParameter[1];
            sqlParameters[0] = new SqlParameter("@v_CCode", SqlDbType.Int);
            sqlParameters[0].Value = val;
            return ex.executeDeleteQuery("DeleteOrders", sqlParameters);
        }
      
    }
}
